package org.usfirst.frc.team4188.robot;

import edu.wpi.first.wpilibj.AnalogInput;
import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.RobotDrive;




/**
 * The RobotMap is a mapping from the ports sensors and actuators are wired into
 * to a variable name. This provides flexibility changing wiring, makes checking
 * the wiring easier and significantly reduces the number of magic numbers
 * floating around.
 */
public class RobotMap {
    // For example to map the left and right motors, you could define the
    // following variables to use with your drivetrain subsystem.
    // public static int leftMotor = 1;
    // public static int rightMotor = 2;
	public static Encoder encoderFrontRight;
	public static AnalogInput practicePotentiometer;
	public static RobotDrive driveBase;
	
	public static Relay practiceRelay;
	
	public static CANTalon frontLeft;
	public static CANTalon frontRight;
	public static CANTalon rearLeft;
	public static CANTalon rearRight;
	public static Gyro drivetraingyro;
	
	
	public static CANTalon testMotor1;
	public static CANTalon testMotor2;
	public static CANTalon testMotor3;
	public static CANTalon testMotor4;
	
	
	
    
    // If you are using multiple modules, make sure to define both the port
    // number and the module. For example you with a rangefinder:
    // public static int rangefinderPort = 1;
    // public static int rangefinderModule = 1;
	public static void init(){
		encoderFrontRight = new Encoder (0,1);
		practicePotentiometer = new AnalogInput (0);
		practiceRelay = new Relay (0, Relay.Direction.kBoth);
		
		drivetraingyro = new Gyro(0);
		frontLeft = new CANTalon(11); 
		frontRight = new CANTalon(12);
		rearLeft = new CANTalon(13);
		rearRight = new CANTalon(14);
		
		

		driveBase = new RobotDrive (frontLeft, rearLeft, frontRight, rearRight);
		driveBase.setSafetyEnabled(false);
		driveBase.setExpiration(0.1);
		driveBase.setSensitivity(0.5);
		driveBase.setMaxOutput(1.0);
		driveBase.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true);
		driveBase.setInvertedMotor(RobotDrive.MotorType.kRearRight, true);
	}
	
	
	
}
